LDFLAGS=-Wl,--gc-sections -lpthread -lz -ldl -lm -lcurl -lcrypto -lssl
CFLAGS=-g -ffunction-sections -fdata-sections

all:
	cargo build
	gcc $(CFLAGS) test.c -o test ../../target/debug/libapi.a $(LDFLAGS)
dist:
	cargo xbuild --release -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort --target x86_64-unknown-linux-gnu
	gcc $(CFLAGS) test.c -o test ../../target/x86_64-unknown-linux-gnu/release/libapi.a $(LDFLAGS)
clean:
	rm test
